<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>w3cschool水平导航表</title>
    <link rel="stylesheet" href="./css表\reset.css">
    <style>
        body{
           
            height: 3000px;
        }
    
        .top-nav{
            width: 1210px;
            height: 49px;
            background-color: #E8E7E3;
            margin: 100px auto;
            position: sticky;
            left: 88px;
            top: 0px;
        }
        .top-nav .item{
            float: left;
            line-height: 48px;
            
        }
        .top-nav a{
            
            display: block;
         
            color: #777777;
            font-size: 18px;
            padding:0 41px;
           
            
        }
        .top-nav .item:last-child a{
            padding: 0 46-px 0 46px;
        }
        .top-nav a:hover{
            background-color: #3F3F3F;
            color:#E8E7E3;
        }

    </style>
</head>

<body>
    <nav class="top-nav">
        <div class="item">
            <a href="#">HTML/CSS</a>
        </div>
        <div class="item">
            <a href="#">Browser Side</a>
        </div>
        <div class="item">
            <a href="#">Server Side</a>
        </div>
        <div class="item">
            <a href="#">Programming</a>
        </div>
        <div class="item">
            <a href="#">XML</a>
        </div>
        <div class="item">
            <a href="#">Web Buliding</a>
        </div>
        <div class="item">
            <a href="#">Reference</a>
        </div>

    </nav>

</body>

</html>